home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright (C) 1993 Robert Davis
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of Version 2, or any later version, of
- * the GNU General Public License as published by the Free Software
- * Foundation.
- */
-
-
- static char RCSId[]="$Id: ContourSeriesPane.m,v 1.2 1993/05/04 16:21:27 davis Exp $";
-
- #import <appkit/Application.h>
- #import <appkit/Form.h>
- #import <appkit/FormCell.h>
-
- #import "ContourSeriesPane.h"
- #import "Status.h"
- #import "StatusContour.h"
-
-
- @implementation ContourSeriesPane
-
- - init
- {
- [super init];
-
- [NXApp loadNibSection: "ContourSeriesPane.nib"
- owner: self
- withNames: NO
- fromZone: [self zone]];
-
- return self;
- }
-
-
- - (BOOL)updateStatus:aStatus doc:aDoc
- {
- BOOL enabled;
-
- [super updateStatus:aStatus doc:aDoc];
-
- if (status) {
- [startField setDoubleValue:[status contourLevelsStart]];
- [incrField setDoubleValue:[status contourLevelsIncr]];
- [endField setDoubleValue:[status contourLevelsEnd]];
- [levelsFormCell setIntValue:[status contourLevels]];
- }
-
- enabled = [doc isEnabled]; /* doc is ContourOptionsPanel*/
- [levelsForm setEnabled:enabled];
- [seriesMatrix setEnabled:enabled];
-
- return NO;
- }
-
-
- - selectControl:sender
- {
- [seriesMatrix selectText:self];
- return self;
- }
-
-
- - setStart:sender
- {
- [status setContourLevelsStart:[sender doubleValue]];
- [self forceUpdateStatus:status doc:doc]; /* This may change levels */
- return self;
- }
-
-
- - setIncr:sender
- {
- [status setContourLevelsIncr:[sender doubleValue]];
- [self forceUpdateStatus:status doc:doc]; /* This may change levels */
- return self;
- }
-
-
- - setEnd:sender
- {
- [status setContourLevelsEnd:[sender doubleValue]];
- [self forceUpdateStatus:status doc:doc]; /* This may change levels */
- return self;
- }
-
-
-
- - setLevels:sender
- {
- [status setContourLevels:[sender intValue]];
- [self forceUpdateStatus:status doc:doc]; /* This may change series */
- return self;
- }
-
-
- // Shuts up the compiler about unused RCSId
- - (const char *) rcsid
- {
- return RCSId;
- }
-
-
- @end
-